package org.example.aidemo.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class User {
    private Long id;
    // 用户名
    private String username;
    // 邮箱
    private String email;
    // 加密后的密码
    @JsonIgnore
    @TableField(exist = false)
    private String passwordHash;
    // 昵称
    private String nickname;
    // 头像URL
    private String avatarUrl;
    // 状态：0-禁用 1-正常 2-锁定
    private Integer status = 1;
    // 邮箱是否验证
    private Boolean emailVerified = false;
    // 创建时间
    private Timestamp createdAt;
    // 更新时间
    private Timestamp updatedAt;
    // 最后登录时间
    private Timestamp lastLoginAt;
    // 登录次数
    private Integer loginCount = 0;
    // 备忘录数量
    private Integer memoCount = 0;

    public String getPasswordHash() {
        return passwordHash;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public String getEmail() {
        return email;
    }

    public Boolean getEmailVerified() {
        return emailVerified;
    }

    public Long getId() {
        return id;
    }

    public Timestamp getLastLoginAt() {
        return lastLoginAt;
    }

    public Integer getLoginCount() {
        return loginCount;
    }

    public Integer getMemoCount() {
        return memoCount;
    }

    public String getNickname() {
        return nickname;
    }

    public Integer getStatus() {
        return status;
    }

    public Timestamp getUpdatedAt() {
        return updatedAt;
    }

    public String getUsername() {
        return username;
    }
    public void setPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setEmailVerified(Boolean emailVerified) {
        this.emailVerified = emailVerified;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setLastLoginAt(Timestamp lastLoginAt) {
        this.lastLoginAt = lastLoginAt;
    }

    public void setLoginCount(Integer loginCount) {
        this.loginCount = loginCount;
    }

    public void setMemoCount(Integer memoCount) {
        this.memoCount = memoCount;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setUpdatedAt(Timestamp updatedAt) {
        this.updatedAt = updatedAt;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
